home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD School House 10
/
CD School House - Education and Games (10.0) - Wayzata Technology (1995).iso
/
mac
/
WIN
/
MATH
/
ZGRWIN36
/
ZGRAFWIN.DOC
< prev
next >
Wrap
Text File
|
1992-11-29
|
81KB
|
2,057 lines
Rise up in splendor! Your light has come. The glory of the Lord
shines upon you (Isaiah 60).
------------------------------------------------------------------------------
CONTENTS
------------------------------------------------------------------------------
I. ZGRAFWIN -- AN INTRODUCTION
II. SETTING UP
III. COMMAND-LINE SWITCH OPTIONS
IV. CONSTRUCTING GRAPHS
A. F-2D Graph
B. G-3D Graph
C. X/Y Line Graph
D. Polar Graph
E. Log Graph
F. Bar Graph
G. Pie Graph
H. Area/Ribbon Graph
V. PRINTING GRAPHS
VI. MISCELLANEOUS
A. Math Functions and Syntax
B. Saving/Restoring Graphics Images
C. Data-File Input Formats
D. The Editor
E. Adding Custom Text to Graphs
VII. FILES INCLUDED ON DISK
VIII. REGISTRATION
-------------------------------------------------------------------------------
I. ZGRAFWIN -- AN INTRODUCTION
This program is designed to allow the user to create, display, and
print X/Y, Polar, Log, Bar, Pie, and Area graphs, as well as graphs
of 2-D functions/expressions [Y = F(X), or F(X,Y) = 0], and 3-D
functions [Z = G(X, Y)] in the MS-Windows 3.X environment.
The program implements a "quick-and-dirty" approach; it may lack a
few of the fancy features that other professional packages offer,
but it does allow the user to create, display, and print a number
of popular graph styles within Windows. It also allows the
importing and exporting of graphics images in color PCX format.
If you are familiar with the DOS ZGRAF program, you will find this
program very similar in operation, and will probably not need to
read this document, other than just to get started. Otherwise, if
you're new to ZGRAF/ZGRAFWIN, you may want to run the demo
program, to get a quick overview of some of the graph styles
available.
ZGRAFWIN is a shareware program. You are encouraged to try it out
and pass it around to your friends. If you decide to use it,
please register the software. The registration fee is just $15.
Requirements for ZGRAFWIN are: MS-Windows ver. 3.0 or later. A
color VGA monitor and a mouse are strongly recommended.
II. SETTING UP
To start the program, run "ZGRAFWIN.EXE" from the Windows Program
Manager.
III. COMMAND-LINE SWITCH OPTIONS
None.
IV. CONSTRUCTING GRAPHS
Instead of giving detailed directions for constructing individual
graphs, a brief description of each type of graph is given, and an
example of constructing a graph of each category is demonstrated.
The directions should become fairly intuitive after working through
just the few examples listed here. . .
By the way, if you need help while working with ZGRAFWIN, just
click on the Tool Bar "Help" button, or select the "Help" top-level
pull-down menu. Help is available on a number of topics--like
information on the different graph styles available, instructions
on how to print a graph, and more.
-------------------------------------------------------------------------------
A. F-2D Graph
Description: Graphs up to four separate "2-dimensional"
expressions in the x-y plane. The user may graph
both functions [i.e., equations of the form F(X) =
0], and non-functions [equations of the form F(X,Y)
= 0]. Data ranges may be selected for graphs
either automatically [auto-scaling ON], or manually
[manual-scaling]; in the latter case the graph
is shown over the range:
xmin <= X <= xmax and ymin <= Y <= ymax,
where the user selects the min. and max. values.
Notes: The first form [F(X) = 0] requires a true function,
e.g., F(X) = 5.0 * X + 3.0 or F(X) = sin(X). The
second form [F(X,Y) = 0] may be used to graph
"non-functions" in the x-y plane, like circles,
hyperbola, etc. For example, one would use an
equation like F(X,Y) = X*X + Y*Y - 25.0 to graph a
circle.
In each case, the user may specify the number of
intermediate data points [n] used to calculate
function values, where 3 <= [n] <= 250. For most
graphs, choosing a value of [n] between 75 and 100
provides adequate "resolution"; larger values of
[n] produce a nicer-looking graph, but will take
longer to calculate. The complexity of the
function also impacts the calculation time. On
most machines, it shouldn't take but a few seconds
to generate a F(X) graph, or a minute or two for an
F(X,Y) graph, with n = 100.
Up to 130 characters may be entered for the F-2D
expression, and the function/expression is
evaluated in double-precision. Most standard math
functions are allowed; see Sect. VI, Paragraph A
for a complete list of legal functions, and for
information on legal function syntax.
Example #1: Graph the following four equations on a single graph
over the range -20 <= X <= 20, -2 <= Y <= 5, using n =
100 intermediate data-points to evaluate each function:
F(X) = sin(X) / X
F(X) = 2.0 * sin(X) / X
F(X) = 4.0 * sin(X) / X
F(X) = 5.0 * sin(X) / X
1. There are 4 expressions. Select "Setup | Number of
expressions" and select "Four". Select "Setup |
Enter expression(s)", and type: "sin(X)/X",
"2.0*sin(X)/ X", "4.0*sin(X)/X", and "5.0*sin(X)/X"
-------------------------------------------------------------------------------
for the four entries (We use an upper- or
lower-case "X" as the variable).
2. Select "Setup | Data ranges/scaling", then select
"X-minimum" and type "-20.0". Select "X-maximum"
and type "20.0". Notice floating-pt. numbers are
used. Enter "-2.0" and "5.0" for the minimum and
maximum Y-values, respectively. Toggle the
manual-scaling ON (since we are MANUALLY selecting
the data-ranges).
3. Select "Setup | Number of data pts", and enter "100".
This corresponds to the number of intermediate
function evaluations to be used by the program
within the interval (Xmin, Xmax) = (-20, 20).
4. Select "Title", and enter "Graphs of sin(X)/X" as
the Main Title.
5. Select "Draw". After a few seconds, the graph
should appear on the screen...
After the graph is displayed, you can try using various
colors for the "Axis color", "Plot color(s)", and
"Background color" categories. Then select "Draw" or
click the "Redraw Graph" Tool Bar Button to re-view the
graph. You can continue trying different settings and
re-generating the graph as necessary to obtain a
pleasing display.
The "Options | Screen grid toggle" option allows you to
switch a grid of dots for the graph on or off.
Example #2: We'll now try an expression in X and Y. We'll graph
the equation:
1.5 1.5
|X| + |Y| = 25, -10 <= X <= 10, -10 <= Y <= 10
1. To graph an expression like this, first rewrite it
in a form ZGRAFWIN can handle, i.e., in the form
"F(X,Y) = 0". Here, we rewrite the equation as:
(abs(X)) ^ 1.5 + (abs(Y)) ^ 1.5 - 25.0 = 0.0
2. There is only one expression in this case, so
click "Setup | number of expressions" and enter "1".
Select "Setup | Enter expression(s)" and type in the
formula: "(abs(X)) ^ 1.5 + (abs(Y)) ^ 1.5 - 25.0".
3. Select "Data ranges/scaling", and enter "-10.0" for
X-minimum and Y-minimum. Enter "10.0" for X-maximum
and Y-maximum. Turn Manual-scaling ON.
4. Select "Number of data points", and enter "50".
-------------------------------------------------------------------------------
5. Select "Draw". While the graph is calculating, the
approximate amount completed is displayed as a
percentage. After a minute or two of calculation
time, the graph should appear on the screen.
Example #3: Graph the equations of a hyperbola,
2 2
X - Y = 25, and of an ellipse,
2 2
(X/5) + (Y/3) = 1.
1. Select "number of expressions" and enter "2".
select "Enter expression(s)" and type in: "X*X - Y*Y
-25.0" and "SQR(X/5.0) + SQR(Y/3.0) - 1.0".
2. Repeat steps 3-5 of Example #2.
Interrupting
Calculations: For the F-2D graph, it is possible to interrupt the
calculation process by pressing/holding down the
[Esc] key while the graph is being computed, if
desired...
ZOOM Adjust: The "View | ZOOM" feature allows the user to "zoom"
into a particular area of the graph. The user may
select a rectangular region onscreen with the
mouse, and the graph is then adjusted to show the
new region more precisely.
Scroll-Bars: The Up-, down-, left-, and right- arrows on the
scroll- bars may be used to adjust the relative
positioning of the graph (Note: Both the ZOOM and
the scroll-bar action is also available on the X/Y-
Line graph, described later).
Rapid-Color
Adjustment: In ZGRAFWIN when a graph is displayed onscreen, the
left and right arrows increment and decrement the
crurrent background color, respectively. The up-
and down-arrows are used to select and change the
color of items appearing in the foreground,
respectively. In Example 3 above, there were 3
foreground items--the x-y axis, and the 2 graph
traces themselves.
I suggest you use the up- and down-arrows as
follows: First press the up-arrow as many times as
necessary until the foreground item you want to
modify is selected. Then press the down-arrow to
switch between available foreground colors for this
particular item (This rapid-color adjustment is
nice to use with the bar-, pie-, and area-graphs,
as you'll see later).
-------------------------------------------------------------------------------
B. G-3D Graph
Description: Graphs a 3-D function Z = G(X,Y), for X, Y, and Z
in the range (Xmin, Xmax), (Ymin, Ymax), and (Zmin,
Zmax), respectively.
Notes: Despite its appearance on the menu, no automatic
scaling is available for this graph. The user
should select values for the min and max values
that "include" the range of values which will be
generated. For example, if the function is:
G(X,Y) = cos( 0.05 * X *Y ),
with -10.0 <= X <= 10.0, and -10.0 <= Y <= 10.0
(as in the example below), one could select the
values (Zmin, Zmax) as (-1.0, 1.0), so that all
points of the cosine-function will be included and
displayed. Again, up to 130 characters may be
entered for the function G(X,Y). The function is
evaluated in double-precision format; see notes on
math-functions and ZGRAFWIN function syntax in
Sect. VI, part A, below.
Interrupting Calc's: Since G(X,Y) "surface plots" require many lines to
be drawn, it may take a little while for the
program to draw a complete graph--please be
patient. You can abort the graph construction
process at any time while the graph is being
created by pressing the [Esc] key -- this may
save you some time if you do make a mistake...
Speed vs. Accuracy: Naturally, there is a tradeoff between graph
accuracy and graph calculation time for this type
of graph, and three accuracy/speed settings may be
chosen. For the first pass at a new function
you might want to use the "Low accuracy / fast"
draw option (under "Setup| Format of graph/speed")
to create a "rough draft", and then for the final
product select the "High accuracy / slow" setting
to generate a more "presentation-quality" graph.
As you might expect, the higher accuracy graph
looks a lot better, but comes at considerable
expense of CPU time--it may take 5-10 minutes
to generate a hi-accuracy graph on a slower
machine...
Example: Graph the function G(X,Y) = cos( 0.05 * X*Y ), for
X in the range (-100,100), and Y in the range
(-100,100). Use medium accuracy/speed.
1. Select "Setup | Enter 3D function", and type
"cos( 0.05 * X * Y ).
-------------------------------------------------------------------------------
2. Select "Setup | Data ranges", then manually
enter the values -10.0 for X-minimum, 10.0
10.0 for X-maximum, -10.0 for Y-min., and 10.0
for Y-max., respectively.
3. Enter -1.0 and 1.0 for Z-min. and Z-max.,
respectively.
4. Select "Setup | Format of graph/speed", then
"Medium accuracy / medium".
5. Use Windows to "Maximize" the screen window in
which ZGRAFWIN is running to full-screen (this
isn't necessary, but seems to help the
hidden-line removal algorithm for this graph
work a little better).
6. Select "Draw" to create the graph.
Wire Frame Toggle: "Options | Screen Frame Toggle" may be used to
switch the "wire-frame" outline for the graph on
or off.
Band-Colorization: A "band colorization" feature allows you to iden-
tify six distinct z-value regions in the graph by
color. This feature can be toggled on/off (see
"Band colorization toggle" under "Format of graph/
speed"). The color of each band corresponds to
each plot color, which you can select with the
"Plot color(s)" selection.
Sample Functions: If you'd like to look at some other "easy"
3-D functions, here's some to try:
sin( 0.05 * X * Y ) , -10 <= X <= 10
-10 <= Y <= 10
-1 <= Z <= 1
cos( 0.5*X ) - sin( 0.5*Y ) , -10 <= X <= 10
-10 <= Y <= 10
-2 <= Z <= 2
sin( 0.05 * sqrt(X*X + Y*Y) ),
-100 <= X <= 100
-100 <= Y <= 100
-1 <= Z <= 1
-------------------------------------------------------------------------------
C. X/Y Line Graph
Description: Graphs up to 1000 (x,y) data-points (total) taken
from a data-file, displaying a user-defined symbol
at each data point. By using different symbols,
multiple "groups" of data may be displayed on a
single X/Y graph grid.
Notes: Each (x,y) coordinate must be entered on its own
line in the data-file, in floating-point format
(anywhere on the line, but with at least one space
separating the x- and y-coordinates). The symbol
to be displayed is either a single character or a
hex representation for a single character (see
(explained below), and must follow the y-coordi-
nate anywhere on the line. Each "group" of data
should have a unique symbol associated with it.
If you want lines drawn between data-points
(connecting lines may be added/removed by the
"Connecting-line toggle" option selection), it is
important to list the data-points in the file
sequentially--in the order in which the data is to
be plotted, as in the example below. . .
Example: It is desired to display five groups of (x,y) data
on a graph, and identify the individual groups with
symbols as follows: "A" for the first group, "B"
for the second, a small triangle for the third, a
small box for the fourth, and an upside-down
triangle for the fifth group of data.
The first data group is: (0, 10), (1, 0), (2, 30),
(3, 20), (4, 10), and (5, 20).
The second data group is: (0,50), (1,60), (2,65),
(3, 65), (4, 60), and (5, 50).
The third data group is: (0,90), (1,100), (2,80),
(3, 90), (4, 100), and (5, 90).
The fourth data group is: (0, 110), (1, 120), (2,
130), (3, 120), (4, 125), and (5, 115).
The fifth data group is: (0, 150), (1,145), (2,
155), (3, 160), (4, 150), and (5, 135).
1. Create the data-file. Use an ASCII editor
(you can use ZGRAFWIN's built-in editor if you
like--see section VI, part B) to create a file
called "xy.dat". For convenience this file is
included with ZGRAFWIN [the "xy.dat" file has
some additional instructions in it, which you
may ignore for now, with the exception of the
"#GRAPH_TYPE" line, and some options in the
"OPTIONS" section, as will be explained]. The
data file looks like this:
-------------------------------------------------------------------------------
This tells ZGRAFWIN the -> #GRAPH_TYPE = XY_GRAPH
type of graph to construct.
These lines specify some -> #OPTIONS = GRID ^ CONNECT ^
of the different available MANUAL ^ SYMBOLS ^
graph options. The graph -> #XMIN = -1.0
has a background grid -> #XMAX = 6.0
("GRID") with connecting -> #YMIN = -20.0
lines between data points -> #YMAX = 170.0
("CONNECT"), and manual
graph scaling will be used
("MANUAL"). The graph symbols will be displayed ("SYMBOLS").
The "XMIN", "XMAX", "YMIN", and "YMAX" variables correspond to the
min. and max. values used on the X- and Y- axes on the graph. If
the XMIN, XMAX, YMIN, and YMAX values were not listed, or if the
"AUTO" (automatic scaling) option was listed instead of "MANUAL"
(manual scaling), the XMIN, XMAX, YMIN, and YMAX values would be
automatically determined by the program, based upon the X- and Y-
input-data ranges occurring in the data.
0.0 10.0 A
1.0 0.0 A
This is the first group of 2.0 30.0 A
data-points, which will be -> 3.0 20.0 A
displayed with 'A' symbols. 4.0 10.0 A
5.0 20.0 A
Blank lines or lines with a
"!" in the first column are ->
comment lines, and are
ignored by ZGRAFWIN.
0.0 50.0 B
Second group of data-points 1.0 60.0 B
will be displayed using 'B' -> 2.0 65.0 B
symbols. 3.0 65.0 B
4.0 60.0 B
5.0 50.0 B
More Blank lines (ignored) ->
The third group of data uses 0.0 90.0 \1E
small triangles. Note: "1E" 1.0 100.0 \1E
is the hexadecimal value for -> 2.0 80.0 \1E
this character in Windows' 3.0 90.0 \1E
OEM character set (this is 4.0 100.0 \1E
just an IBM graphics char.) 5.0 90.0 \1E
The fourth data group goes 0.0 110.0 \FE
here. "\FE" is the graphics 1.0 120.0 \FE
representation for a small -> 2.0 130.0 \FE
box char. (value FEH). 3.0 120.0 \FE
4.0 125.0 \FE
5.0 115.0 \FE
Fifth group of data-points 0.0 150.0 \1F
will be displayed using -> 1.0 145.0 \1F
upside-down triangless (hex 2.0 155.0 \1F
value 1FH). 3.0 160.0 \1F
4.0 150.0 \1F
The last line of the file -> 5.0 135.0 \1F
-------------------------------------------------------------------------------
When done editing, save the file, and return
to the ZGRAFWIN "X/Y Line" menu.
2. Under the "X/Y Line" Setup menu, select "Load
data file". When prompted for the name of the
data-file, type "xy.dat". The program should
indicate that 30 data-points were "Loaded OK".
3. Select "Draw" or click the "Redraw Graph" Tool
Bar button to draw the graph.
D. Polar Graph
Description:
Graphs up to 1000 data-points (total) taken from a
data-file, displaying a user-defined symbol at each
data point. By using different symbols, multiple
"groups" of data may be displayed on a single polar
graph grid. Input data is in either RECTANGULAR
(x,y) format or in POLAR (radius, angle) format.
Notes: (Same as for X/Y Line Graph)
Example: Graph the 22 data points listed in the file
"polar.dat", included with ZGRAFWIN. Since data in
this file is in polar format, each line of data in
the file is of the form:
[r] [theta] [symbol] ,
where [r] and [theta] are the standard polar radius
and angle (radians) quantities, and [symbol] is the
symbol to be displayed (="*" for this example).
1. Use the ZGRAFWIN editor to look at the
"polar.dat" file (select "Editor" under the
"Options" menu, then select "Open" and type
in "polar.dat"). The lines beginning with
"#" are command-lines and provide specific
graph information to ZGRAFWIN. E.g., there
are commands to specify the background,
axis, and plot colors for the graph.
There is also an "#OPTIONS" line. Use this
command (as you may have observed) to
specify any of several options for the
graph. Here, to inform ZGRAFWIN that data
for this graph is being entered in POLAR
[not (x,y) RECTANGULAR] format, the "POLAR"
switch is specified on the "#OPTIONS" line.
The last part of the file is just a list of
22 data points.
2. When finished examining the file, select
"Setup | Load data file" and load the file.
ZGRAFWIN should indicate that 22 data-points
were loaded.
3. Select "Draw" to draw the graph.
-------------------------------------------------------------------------------
E. Log Graph
Description: Graphs up to 1000 (x,y) data-points (total)
taken from a data-file, in a similar format to
that used in the X/Y line graphs discussed
earlier, but on a logarithmic-type grid.
Notes: (See X/Y Line Graph for description of data-
file formats).
Three styles of logarithmic graphs may be
constructed:
1. Linear X, Log Y
2. Linear Y, Log X
3. Log X, Log Y
For the log scales, it is required that:
1. All data coordinates be > 0.0.
2. The ratio of largest to smallest
coordinates in the graph must not
exceed 10^5.
Example: Given the data-points:
(1.0, 1.0),
THIS EXAMPLE WILL NOT WORK ! -> (2.0, 100.0),
(3.0, 1000.0),
(4.0, 1000000.0)
one could create a log-log graph using
only the first 3 data-points, because
if the 4th data-point were included,
the y-coordinate ratio would be 10^6 /
1.0 = 10^6, which exceeds the maximum
allowable ratio (10^5).
Example: Display two groups of data on a log-log graph;
plot the first group of data using plus (+)
symbols, and the second group using "oh" (o's).
The first group of data is: (1,8), (10,80),
(100,800), and (1000,8000).
The second group is: (50,50), (500,500),
(5000,5000), and (50000,50000).
1. First create the data-file. Use an ASCII
editor to edit the file "log.dat", so that
it looks like this (notice that floating-
pt. values are used for the data points):
-------------------------------------------------------------------------------
! ************************
The "!" symbol in the 1st col. -> ! * Sample Log Graph. . .
indicates that these are com- ! ************************
ment lines.
The '#' symbol in 1st column -> #GRAPH_TYPE = LOG
denotes a command line. Here #OPTIONS = LOG_LOG ^ CONNECT ^
ZGRAFWIN is told that this is
a log graph, and we've chosen
the LOG_LOG ( log-X, log-Y )
format. The 2nd option says
that line-connection is turned
on, so that lines are drawn
between data points. Because
there are two options on one
line, each option is separated
with the carat "^" delimiter
The delimiter's needed when
there are two or more words
or fields to separate.
The title of the graph is also -> #MAIN_TITLE = Sample Log Graph ^
provided. The carat symbol is
used to indicate the end of
the string here also (Since
titles may contain whitespace
between words, a space is not
used as the delimiter).
Next, set the background, -> #BKG_COLOR = 0
axis, and the 2 plot colors to #AXIS_COLOR = 12
(color 0), bright red (color #PLOT_COLORS = 13 ^ 14 ^
12), bright magenta (color
13) and bright yellow (14),
respectively. See Note #2 in
Part VI, Sect. C, "Command
Line Syntax", about Plot
and Fill Colors.
"#DATA" is an optional identi- -> #DATA
fier to indicate that the 1.0 8.0 +
8 data-points now follow. 10.0 80.0 +
100.0 800.0 +
Note: For more details on 1000.0 8000.0 +
the "#" commands and options,
refer to Section VI, Part C. 50.0 50.0 o
500.0 500.0 o
5000.0 5000.0 o
50000.0 50000.0 o
When done editing the data file, return to
the Log Graph menu.
2. Under the "Log Graph" Setup heading, select
"Load data file". Type in "log.dat" as the
name of the file. The program should
indicate 8 data-points were "Loaded OK".
3. Select "Draw" to draw the graph.
-------------------------------------------------------------------------------
F. Bar Graph
Description: Allows the user to make a bar graph, of up to 3
separate groups of bars.
Notes: The total number of bars in the graph must not
exceed 30. The number of bars is calculated
from the formula:
(# Bars, = (# Groups) x (# Samples per Group)
Total )
As an example, the program could handle 3 groups
of bars, with 10 samples in each group (30 bars
total), but not 2 groups of 16 samples each (32
bars total).
[Note: the term "sample" is used here somewhat
loosely; sampling in a statistical sense is not
necessarily implied...]
Options: 2-D or 3-D bars may be drawn; the fill-color
of each bar (group) may be chosen. Data may be
entered in manually as in Example #1 below,
or taken from a data file as in Example #2.
Automatic or manual scaling may be used to
determine the range of bar heights on the y-axis.
Example #1: Create a 3-D Bargraph entitled "Average Rainfall
(in.), Jan-May", for 3 cities, using the follow-
ing rainfall data:
Chicago:
Jan.: 18, Feb.: 25, Mar.: 30, Apr: 40, May: 35.
New York:
Jan.: 22, Feb.: 33, Mar.: 20, Apr: 11, May: 20.
Seattle:
Jan.: 58, Feb.: 72, Mar.: 40, Apr: 35, May: 25.
1. For this example, there are three groups of
bars (1 bar group for each city), and there
are five samples in each group. Select "Bar
groups" under "Setup", and enter "3"; select
"Number of samples/group" and enter "5".
2. Select "Enter data" and manually enter the
15 rainfall quantities into the first 15
cells on the form entry screen. Enter
the first sample for the first group
(Chicago), then the first sample for the
second group (New York), then the first
sample for the third group (Seattle). Then
enter the second samples for the first,
second, and third groups, respectively,
-------------------------------------------------------------------------------
etc. [Tab] may be used to move from one
field to the next on this screen. So type
in:
"18.0 [Tab] 22.0 [Tab] 58.0 [Tab]
25.0 [Tab] 33.0 [Tab] 72.0 [Tab]
30.0 [Tab] 20.0 [Tab] 40.0 [Tab]
40.0 [Tab] 11.0 [Tab] 35.0 [Tab]
35.0 [Tab] 20.0 [Tab] 25.0 [Tab]".
Then select the "OK" button.
3. Select "Titles | Item titles" and enter the
5 individual sample descriptions, i.e., "Jan.
[Enter] Feb. [Enter] Mar. [Enter] Apr.
[Enter] May [Enter]".
4. Select "Legend titles", and type in the 3
group legend titles, i.e., "Chicago", "New
York", "Seattle".
5. Select "Main Title", then type in "Average
Rainfall (in.), Jan-May".
6. Select "Options | Style", then "3-D Bars".
7. Press "Draw" to draw the graph.
8. Try different bar fill-colors, and redraw
the graph. For this graph each unique
fill-color corresponds to the color of an
indivdual bar group in the set.
Rapid Color Adjust: For Bar Graphs, The up- and down- arrows may be
used to change the fill-color of each group
individually.
Painting in Fills: To Paint in a particular (bounded) region of the
graph, just position the mouse to a location
within the region to colorize, and click the
left button. The region will be filled in with
the current paint color [The paint color may be
set/changed under the "Options", "Colors"
submenu, or by just clicking the right mouse
button]. This is a quick way to color in
regions, and is especially useful on the pie,
bar, and area graphs for coloring in fills.
Example #2: Create the same graph demonstrated above, but
use the input data from the data-file "bar.dat"
[This file contains the same data which was
entered manually in Example #1].
1. Use an editor (e.g., the ZGRAFWIN editor)
to edit the file "bar.dat". We'll examine
in detail the commands present in this file
(listed here for convenience):
-------------------------------------------------------------------------------
Indicate the Type of Graph -> #GRAPH_TYPE = BAR_GRAPH
Indicate the Number of Bar -> #NUMBER_OF_GROUPS = 3
Groups and Samples in the #NUMBER_OF_SAMPLES = 5
bar graph.
Specify the various graph -> #DRAW_COLOR = 15
Colors and Fill Colors-- #BKG_COLOR = 0
if not specified here, the #FILL_COLORS = 12 ^ 13 ^ 14 ^
current values for these
parameters in memory will
be used. There are 3 bar
groups, so 3 fill-colors
are used. Bright red (12)
is used in the 1st bar
group, Bright magenta (13)
in the 2nd, and Yellow
(14) is used in the third.
We use a bright-white
border (15), and a black
(0) background color.
Provide legend, item, and -> #MAIN_TITLE = Av. Rain., Jan-May^
main graph titles. There #LEGEND_TITLES = Chic.^ NY ^Seattle^
are 3 group legends and 5 #ITEM_TITLES = Jan^Feb^Mar^Apr^May^
item samples (words are
abbreviated in the titles
here to allow lines to fit
on this page, but the file
uses the complete strings).
Indicate that a 3-D [not a -> #OPTIONS = 3D ^ AUTO ^
2-D graph] will be drawn.
Use automatic [not manual,
user-specified] bar-height
scaling.
Finally, list the data to -> #DATA
appear in the graph. Note 18.0 22.0 58.0
that each row corresponds 25.0 33.0 72.0
to the data for 1 sample, 30.0 20.0 40.0
listing the rainfall for 40.0 11.0 35.0
Chicago, New York, and 35.0 20.0 25.0
Seattle, respectively.
2. After editing is complete, select "Load data
file", and type in "bar.dat". Program will
indicate that data for 3 groups of bars, and
5 samples per group was loaded.
3. Press "Draw" to draw the graph.
Note: The Miscellaneous section, part C, provides
complete details on input data-file formats for
bar graphs, covering formats for one, two, and
three groups of data. For simplicity, that
information is not discussed in detail here..
-------------------------------------------------------------------------------
G. Pie Graph
Description: Allows the user to construct a pie graph.
Notes: The Maximum Number of Slices in the Pie is 10.
Data is averaged, so the total of the slice
magnitudes need not necessarily add up to 100
(i.e., 100 percent).
Options: 2-D and 3-D pies may be drawn. Fill-colors may
be selected for each slice in the pie, or a
different "cross-hatch" pattern can be used to
identify each slice. Input data may be entered
manually (as in the example, below), or taken
from a data file (see the Miscellaneous section,
part C, for pie graph input data-file formats).
The file "pie.dat" contains the input data for
this example, if you'd like to try loading a
data-file instead of entering the data-values
in manually.
Example: Create a 3-D Pie Graph entitled "Grain Sales, by
Percent" with the following data: Wheat: 30,
Corn: 25, Soy: 20, Rice: 10, Other: 15.
1. Select "Setup | Number of slices"; type "5".
2. Select "Enter/Edit data" and enter the five
percentages in floating-point format, i.e.,
"30.0", "25.0", "20.0", "10.0", and "15.0"
into the first 5 cells of the "Slice-size"
column.
3. Select "Options | Style", then "3-D".
4. Select "Titles" and enter "Grain Sales by
Percent" as the main title.
5. Select "Item titles" and enter the five item
descriptions, i.e., "Wheat [Enter] Corn
[Enter] Soy [Enter] Rice [Enter] Other
[Enter]".
6. Select "Draw" to draw the graph.
Notes: Radius Adjustment
When printing a pie graph (printing is
explained in Section V), you may find it
desirable to adjust the radius of the pie,
to produce a smaller/larger pie circle. Any
floating pt. value between 0.1 and 10.0 may
be used. 5.0 represents a default radius
value, which may/may not be appropriate for
your printer...
-------------------------------------------------------------------------------
H. Area/Ribbon Graph
Description: Graphs up to 1000 (x,y) data-points (total)
taken from a data-file, as "area" curves,
displaying a user-defined symbol at each data
point. By using different symbols, multiple
"groups" of data may be displayed on a single
X/Y graph grid.
Notes: This graph is somewhat like the X/Y line graph,
except that instead of showing lines, this graph
shows area "ribbons" bounded by the data points.
The data point specification format is the same
as that for the xy-line graph: each (x,y)
coordinate must be entered on its own line in
the data-file, and the symbol to be displayed
must follow the y- coordinate on the line. Each
"group" of data should have a unique symbol
associated with it.
Again, it is extremely important to list the
data-points in the file sequentially--order the
data groups themselves (from smallest to largest
in terms of the y-coordinates), and order the
data within each group (starting with the
smallest x-coord., and ending with the largest
x-coord.), as in the example below. Otherwise
this graph will look like a mess, with "fill"
colors splashed everywhere!
Options: Separate fill colors for each individual data
region may be selected. The graph can be drawn
front-to-back or back-to-front. Use the "Re-
verse Stacking Order" option to control this
operation.
Painting in Fills: As noted earlier, to paint in a particular
(bounded) region of the graph after the graph
is drawn, you can position the mouse to a
location within the region to colorize, and
click the left button. The paint color may be
set/changed by clicking the right mouse button.
Example #1: It is desired to display five groups of (x, y)
data on a graph, and identify the individual
groups with specific symbols. To make things
easier, use the same symbols and data as for
the x/y line graph presented earlier.
1. Create the data-file. Use an ASCII editor
to edit a file "area.dat", containing the
data points and symbols. Since the data
here is identical with that used in the x/y-
-------------------------------------------------------------------------------
line graph example, one could edit the data
file for that graph, but for convenience you
can just use the "area.dat" file included
with ZGRAFWIN -- it already has appropriate
titles and graph colors specified in it...
In the file you may notice the absence of
underscores on some of the commands and
identifiers--e.g., "AXIS COLOR" instead of
"AXIS_COLOR", etc. This works because
ZGRAFWIN's data- file parser scans each line
looking for certain unique "tokens" (in this
case "AXIS", not the full "AXIS_COLOR" is
the token). Thus, it is possible to use
alternate, more "English-language-like"
versions of some of the commands. And don't
worry. If you DO happen to specify an
illegal expression on a line, ZGRAFWIN will
let you know about it. The program will
stop and display the offending token and
line number in the data file, so you can go
back and correct the error...
2. Under the Areas "Setup" heading, click "Load
data file". When prompted for the name of
the data-file, type "area.dat". The program
indicates that 30 data-points were Loaded.
3. Now select "Draw" to construct the graph.
To experiment, use the arrow keys to change
graph fill colors, which will change the
colors of individual area regions in the
graph.
Example #2: For this example, we'll create an area graph
using a function F(X), and demonstrate how a
function can be used to supply "input" data for
a graph. . .
1. Create the function graph "F(X) = sin(X)/X",
as in the F-2D graph example...
2. Move over to the Area graph menu, and select
"Draw". Since no new file was loaded, the
data currently in memory from the F(X) =
sin(X)/X graph is utilized. What's drawn is
the F(X) = sin(X)/X curve, as an area/ribbon
graph...
Note: It is possible to "pipe" the input data
calculated via a function/expression to
another graph (as was done in this example)
in the case of the X/Y line, Log, Polar, and
Area graphs. It is also possible to read a
data file in for one type of graph, and then
graph it (by selecting "Draw") on another
menu. This last variation CAN result in
unpredictable program behaviour, though, if
done irreverently--so do be careful!
-------------------------------------------------------------------------------
V. PRINTING GRAPHS
Graphs may be printed by selecting "Print" (the last item on each
graph pull-down menu) or by clicking the "Print" Tool Bar button.
IMPORTANT: One should first generate the graph on the screen (with
a graph's "Draw" pull-down menu selection or with the
"Redraw Graph" button) prior to printing it, otherwise
printing may not work properly!
Two different print-modes are supported in ZGRAFWIN--Screen
Printing and Direct-GDI Printing. Screen-printing, as the title
suggests, takes a bit-mapped "picture" of the screen, and sends it
to the printer. Direct-GDI printing involves directing the
Windows' Graphics-Device-Interface (GDI) calls (i.e., the function-
calls used to create a graph) directly to the printer driver.
There are advantages and disadvantages to each style of printing...
The screen-print format is generally faster (because Windows can
use a "banding" technique to print the data, which saves memory),
but it may not always produce elegant-looking output, especially if
Windows has to scale the bit-mapped image significantly to meet the
dimensions of the printed page. The direct-GDI call approach is
slower, but can take advantage of the full pixel-resolution of the
printer, and often produces more professional-looking output.
Print settings may be selected under the Main Menu "Options"
section. Briefly, the options available are:
1. Area to Print (Selects Region of the Window to Print--
This Applies for Screen-Print Modes Only -- See Item #2,
Below):
Whole Window - Prints Window Interior (Client Area) Plus
Window Caption, Window Border, etc.
Client Area - Prints Window Interior (Client Area) Only.
2. Type of Print (Selects Screen-Print Mode or Direct-GDI
Mode, and allows specification of scaling for Screen-Print
modes):
Best-Fit - This type of Screen-Printing forces the
horizontal dimension of the printed image to
full-page width, with the vertical dimension
set to maintain the proper aspect ratio. This
scaling mode is best for printing graphs
utilizing circles, e.g., polar and pie graphs.
Full-Page - This Screen-Print mode attempts to scale the
output to cover approximately the whole printed
page.
1X-2X-3X - This Screen-Print mode either uses no scaling
(the same image pixel height and width on the
screen are used in the printed output), OR it
scales by exact multiples (2, 3, 4, etc.) of
-------------------------------------------------------------------------------
the screeen pixel height and width, as
necessary to cover as much as the page as
possible. This setting is best for graphs with
a lot of "fine detail", where the aspect ratio
isn't critical...
Direct-GDI - This mode does not use "screen-printing", but
sends Windows' GDI commands directly to the
printer driver.
3. Output Color Format (Adjusts Graph for Printing of Color or
Black-and-White Output):
Color - This selection prints the colors and fill areas as
shown on the screen.
Blk-and-Wht - If this selection is chosen, graph entities (axis,
plot, background colors, fill-colors, etc.) will
be adjusted or converted to appropriate settings
that are visible for black-and-white printed
output, immediately before the graph is printed.
For example, color "solid" fills will be converted
to "hatch" fills on the pie, bar, and area graphs,
so that they will be visible in black-and-white...
You are encouraged to experiment with these print settings as
necessary to produce good results. You may wish to use the
"Direct-GDI" print-mode most of the time. Because of speed and
memory-usage considerations, however, the Direct-GDI print mode is
NOT recommended for printing G-3D graphs--Use Screen-Print instead.
The "Print Setup" option brings up the familiar Windows printer
driver dialog box, under Windows 3.1. If you are using Windows
3.0, or if "Cannot Load Printer Driver" results when you click on
this selection, just use the Windows Control Panel to adjust your
settings. If your printer driver supports it, I recommend using
"landscape" orientation be used for printing ZGRAFWIN graphs.
By the way, instead of using "Print" to print graphs, you can do
a "screen print" of the window at any time (by selecting "Print
window" on the "Options | Print" menu).
Once you start the print operation, a "Preparing for Print" dialog
box will appear onscreen, with a "Cancel" button to abort printing.
After the dialog box goes away, the Print Manager will take over
and handle the rest of the job. At this point, you may click on
the Print Manager icon and select "Abort" to halt printing...
*******************************************************************
** **
** WHAT TO DO IF YOU ARE UNABLE TO PRINT... **
** **
*******************************************************************
If printing doesn't work, first check your "WIN.INI" file in the
directory where Windows was installed (e.g., "\WINDOWS") for proper
printer-setup information, as explained in the next sections...
-------------------------------------------------------------------------------
In examining WIN.INI, printers are listed in two or three different
sections--the [windows] section, and later in the [PrinterPorts]
and/or [devices] section. For ZGRAFWIN printing to operate, you
need to have a string with your printer device name, driver name,
and the output port listed in the first [windows] section of the
file, like this:
[windows]
[other lines here...]
device=IBM Graphics,IBMGRX,LPT1:
In this case, the device name is IBM Graphics, the driver name is
IBMGRX, and the output port is LPT1. If you're unsure of
appropriate device/driver/port selections, you can get some ideas
by looking in the [PrinterPorts] or [devices] section of WIN.INI.
Make sure that the driver-file exists (e.g, in this case, there
must be a "IBMGRX.DRV" file in the \WINDOWS\SYSTEM directory) and
ensure that the output port is operational on your computer.
If your WIN.INI file does not have the right driver/port/etc.,
you'll need to edit it so that it contains the correct information.
IMPORTANT: PLEASE MAKE A BACKUP COPY OF YOUR ORIGINAL "WIN.INI"
FILE BEFORE MAKING CHANGES TO IT, IN CASE OF PROBLEMS!
After editing, save the file and return to Windows.
Second, if you are having problems doing a "Screen Print", try
reducing the size of the window before printing. In some cases
when memory is tight it may be impossible to print a large window,
although smaller windows can be printed just fine.
Third, make sure your printer is configured appropriately for your
Windows configuration (under "Printers" in the Windows Control
Panel). As an example, if you have a Laser printer with only 0.5
Meg. of RAM, you'll get a printer error if Windows thinks your
printer has 2.0 Meg, or if you're set to print at a very high dpi
setting.
If printing still doesn't work, check that your printer is hooked
up properly, and ensure that it is online/ready-to-print. If
problems persist, you may need to re-install and/or reconfigure
your printer setup (see your Microsoft Windows documentation for
more information).
Example: Create and Print a Bar Graph.
1. Create the bar graph given in Sect. IV, part F. Select
"Bar | Options | Style", then "Single-color graph", then
generate the graph.
2. When the graph is displayed onscreen, click the "Print"
Tool Bar button to print it. If your settings in "WIN.INI"
are correct and your printer is ready to go (as discussed
above), the graph will start printing after a few seconds.
-------------------------------------------------------------------------------
VI. MISCELLANEOUS
A. Math Functions and Syntax
The following are legal math functions for this program:
ABS() -- absolute value
ACOS() -- arc cosine
ASIN() -- arc sine
ATAN() -- arc tangent
COSH() -- hyperbolic cosine
COS() -- cosine [argument in radians]
EXP() -- e (= 2.7182) raised to the () power
LOG10() -- common logarithm (base 10)
LOG() -- natural logarithm (base e)
POW10() -- ten raised to the () power
RAND() -- random number in the Range [0,1]
SINH() -- hyperbolic sine [argument in radians]
SIN() -- sine [argument in radians]
SQRT() -- square root
SQR() -- square, i.e., () raised to 2nd power
TANH() -- hyperbolic tangent [argument in radians]
TAN() -- tangent [argument in radians]
The following operators are valid in functions:
+ Addition - Subtraction
* Multiplication / Division
^ To the Power, e.g., 5^3 = 125 () Parenthesis
These functions and operators may be used in either the F-2D
and G-3D expressions to represent mathematical formulae,
with results calculated in double-precision.
Functions must be entered using proper algebraic syntax, or
ZGRAFWIN's function parser will indicate an error ("Syntax
Error" will be displayed). An example of some legal and
illegal ZGRAFWIN functions now follows:
Sample F-2D functions/expressions:
1. 5.0 <- OK (graph = constant)
2. sin(x) <- OK (trigonometric)
3. tan(x) / x + 2.6 <- OK (trig., x non-zero)
4. 17.0 + x*(-3.0 + x*(-1.0 + 2.0*(x))) <- OK (polynomial)
5. 3*x + 2*y - 15.0 <- OK (line)
6. x*x + y*y - 25.0 <- OK (circle)
7. sin(P)/cos(x) <- Illegal (the symbol
'P' is not defined)
8. sin(2.0 * x + (3.0 * x) <- Illegal (Parenthesis
imbalance)
9. 3.0 * x + 5.0 = 8.0 <- Illegal ('=' symbol
not allowed)
-------------------------------------------------------------------------------
Sample G-3D functions:
1. 3.0 <- OK (plane)
2. X - 5.0 <- OK (plane)
3. sin(X * Y * 0.05) <- OK (curved surface)
4. sqrt( X/Y ) <- OK (curved surface,
Y non-zero, | X/Y | > 0)
5. Z = exp(X) * sin(Y) <- Illegal ('=' and 'Z' are not
allowed)
Notes: If you enter an EXTREMELY complicated expression, you'll get
a parser stack error, but for most practical expressions/
functions there is no need to worry about even approaching
this stack limit...
A "Math Calculation Error" may result, usually due to
evaluation of a function at a singularity or at a value not
in the function domain, [e.g., evaluating F(X) = log(X) at X
= 0]. To fix the problem, change the interval over which
the function is to be graphed, so that discontinuities or
illegal domain values are avoided...
In some instances, it may be possible to graph a function
over a range which does include singularities--for example,
it is possible to graph F(X) = 1.0/X from -10.0 to 10.0,
using n = 100 data points (even though the function "blows
up" at X = 0). In this instance we are fortunate, because
don't have to evaluate the function PRECISELY at X = 0.
You'll note that the trace around X = 0 isn't very accurate!
B. Saving/Restoring Graphics Images
ZGRAFWIN supports the standard PCX graphics format. Images may
be imported into ZGRAFWIN ("Options | Image Load/Save| Load PCX
File") and/or saved to a file ("Save PCX File" on same menu).
Monochrome, 16-color, and 256-color PCX images may be imported
into ZGRAFWIN. Using the scroll bars, images can be scrolled
up/down and right/left as necessary to view even large PCX
images... ZGRAFWIN allows graphics images to be saved in
the 16-color PCX format.
In addition, there is an option allowing the user to copy the
graphics screen to the Windows Clipboard, for use with other
graphics software, e.g., the Windows Paintbrush program. This
feature is also on the "Options | Image Load/Save" menu.
-------------------------------------------------------------------------------
C. Data-File Input Formats
Numeric-Data Formats:
--------------------
ZGRAFWIN expects numeric data in a specified format for each of
the different graph categories. Input data must be in the
following format:
1. F-2D -- N/A
2. G-3D -- N/A
3. X/Y Line, Log, Area:
Each row in the file should have 3 entries, an
x-coordinate, a y-coordinate, and a symbol, separated
by whitespace. That is, each line should look like:
[x] [y] [symbol]
Here, the [x]- and [y]-coordinates are floating-point
numbers--[symbol] is either an ASCII character (e.g.,
"A") or a hex representation of an "unprintable" IBM
graphics character, e.g., "\1E" represents graphics
character 1EH, a small triangle. In particular, the
triangle symbols (1EH and 1FH) are particularly useful
in graphs, as is the "diamond" (04H) and "box" (FEH).
4. Polar:
Each row in the file should have 3 entries--an
x-coordinate, a y-coordinate, and a symbol; alter-
natively, a radius, an angle, and a symbol may be used:
[x] [y] [symbol]
- OR -
[r] [theta] [symbol]
The [x]-, [y]-, [r]- and [theta]-values are all float-
point numbers; [theta] is in radians, and [symbol] is
an ASCII character/hex representation.
5. Pie:
Each row in the data file should contain the size of an
individual sector in the pie (a floating-point number).
For [n] slices in the pie, there should be [n] data
lines in the data file, each of the form:
[Slice size]
where [Slice size] is a floating-pt. number.
-------------------------------------------------------------------------------
6. Bar:
The format of the data file depends upon the number of
bar groups in the graph, as follows (assuming there are
[n] data samples):
For 1 Group of Bars: [Sample 1]
[Sample 2]
[Sample 3]
.
.
.
[Sample n]
For 2 Groups: [Samp. 1, Group 1] [Samp. 1, Group 2]
[Samp. 2, Group 1] [Samp. 2, Group 2]
[Samp. 3, Group 1] [Samp. 3, Group 2]
. .
. .
. .
[Samp. n, Group 1] [Samp. n, Group 2]
3 Groups: [Samp 1/Gr 1] [Samp 1/Gr 2] [Samp 1/Gr 3]
[Samp 2/Gr 1] [Samp 2/Gr 2] [Samp 2/Gr 3]
[Samp 3/Gr 1] [Samp 3/Gr 2] [Samp 3/Gr 3]
. . .
. . .
. . .
[Samp n/Gr 1] [Samp n/Gr 2] [Samp n/Gr 3]
Note that there are as many rows in the file as there
are bar samples, and as many entries on each row as
there are bar groups (1-3).
Command-Line Syntax:
-------------------
The general syntax of a ZGRAFWIN data-file command line (i.e.,
a line which begins with "#") is:
#[COMMAND id] = [EXPRESSION] ,
where command identifiers and expression values represent the
legal identifiers and expressions for the different graphs, as
listed in the following chart:
-------------------------------------------------------------------------------
GRAPH
[COMMAND id] APPLICABILITY LEGAL [EXPRESSION] values
-------------------------------------------------------------
#GRAPH_TYPE All [See Item #1 Below]
#AXIS_COLOR XY/Polar/Log A Number, 0-63
#BKG_COLOR All A Number, 0-63
#DRAW_COLOR Bar/Pie/Area A Number, 0-63
#PLOT_COLORS XY/Log/Polar [See Item #2 Below]
#FILL_COLORS Bar/Pie/Area [See Item #2 Below]
#FILL_PATTERNS ------- Not Yet Implemented -----------
#MAIN_TITLE All A String terminated by "^"
#HORIZ_TITLE XY/Log/Polar/Area A String terminated by "^"
#VERT_TITLE XY/Log/Polar/Area A String terminated by "^"
#LEGEND_TITLES Bar One or More Strings,
Each Delimited by "^"
#ITEM_TITLES Bar/Pie A String terminated by "^"
#DATA All [None Needed]
#NUMBER_OF_SAMPLES Bar A Number, 1 - ?
#NUMBER_OF_GROUPS Bar A Number, 1-3
#XMIN XY A Floating-Pt. Number
#XMAX XY A Floating-Pt. Number
#YMIN XY / Bar A Floating-Pt. Number
#YMAX XY / Bar A Floating-Pt. Number
#OPTIONS All [See Item #4 Below]
1. The #GRAPH_TYPE Command must appear in the data file,
and should be followed by one of the following graph
identifiers:
XY_GRAPH
POLAR_GRAPH
LOG_GRAPH
BAR_GRAPH
PIE_GRAPH
AREA_GRAPH
2. The #PLOT_COLORS and #FILL_COLORS Commands should be
followed by an expression listing the appropriate
number of plot/fill colors for the graph, each
separated by a carat ("^"). Each Plot or Fill Color
should be in the range 0-63. The first 16 colors are
the standard VGA PURE colors, i.e.,
Black = 0 Gray = 8
Blue = 1 Bright Blue = 9
Green = 2 Bright Green = 10
Cyan = 3 Bright Cyan = 11
Red = 4 Bright Red = 12
Yellow = 5 Bright Yellow = 13
Brown = 6 Bright Brown = 14
White = 7 Bright White = 15
and the remaining 48 colors are "dithered" variations
of these.
-------------------------------------------------------------------------------
As an example, the following command-line specifies
three fill colors as Blue (0), Green (2), and Cyan (3).
#FILL_COLORS = 1 ^ 2 ^ 3 ^
For a bar graph, each fill color corresponds to the
color of an individual bar group. For pie and area
graphs, each fill color corresponds to an individual
pie slice or area ribbon in the graph. For an XY-,
Polar, or Log-style graph, each plot color corresponds
to an individual data group within the graph.
3. The #OPTIONS command should be followed by a list of
appropriate options switches, each of which is
separated by a carat ("^"). Legal Options Switches
are:
CONNECT - Forces Line Connect Display ON
NO_CONNECT - Forces Line Connect Display OFF
SYMBOLS - Forces Symbol Display ON
NO_SYMBOLS - Forces Symbol Display OFF
for Polar -> POLAR - Specifies POLAR input data format
Graphs Only -> RECTANGULAR - Specifies RECTANGULAR input format
GRID - Forces Grid Display ON
NO_GRID - Forces Grid Display OFF
for Log -> LOG_X - Specifies a Log X, Linear Y Graph
Graphs -> LOG_Y - Specifies a Log Y, Linear X Graph
Only -> LOG_LOG - Specifies a Log X, Log Y Graph
for Pie and -> 2D - Specifies a 2-Dimensional Graph
Bar Graphs -> 3D - Specifies a 3-Dimensional Graph
Only
for X/Y and -> MANUAL - Manual Scaling (user enters the X-
Bar Graphs and/or the Y- axis ranges)
Only -> AUTOMATIC - Automatic Scaling (default)
Example: For a Polar Graph, the Following #OPTIONS Line Forces
the Input Data to POLAR format, turns the Line-Connect
feature ON, and turns the Grid Display feature ON:
#OPTIONS = POLAR ^ CONNECT ^ GRID ^
-------------------------------------------------------------------------------
Note that all commands and expressions are upper-case. Since a
"minimal" token-parsing technique is used, shortened versions or
alternate versions of both the [COMMAND id] and [EXPRESSION]
identifiers may be utilized in many cases. For example, the
following command lines are all equivalent:
#GRAPH_TYPE = BAR_GRAPH
#GRAPH TYPE = BAR GRAPH
#GRAPH = BAR GRAPH
#GRAPH = BAR
An invalid command line will be rejected by the parser, and an
error message will displayed, showing the invalid token and line
number in the file...
D. ZGRAFWIN Editor
ZGRAFWIN has a built-in editor, to assist in viewing and editing
smaller ASCII files (less than 10K bytes). The editor is under the
"Options" menu, or can be accessed by clicking the "Edit Text" Tool
Bar button. The selections are fairly straightforward, and
parallel those used in other Windows programs; thus, only a brief
command summary will be given. The basic options are:
New -- Clears the Edit Workspace.
Open -- Opens A New File For Editing in the Workspace
Save -- Saves A File from the Workspace to Disk
Save As -- Saves A File, Prompting for User-entered File Name
Exit Editor -- Leaves Editor and Returns to Main ZGRAFWIN Program
The editor's range of "word-processing" features is fairly limited,
but there are basic options to cut, copy, and paste to/from the
clipboard, etc., as in other Windows file-processing applications.
This built-in editor may be useful in editing graph data files...
E. Adding Custom Text to Graphs
ZGRAFWIN has a feature which makes it possible to add customized
text, labels, etc. to a graph. Up to 30 separate strings, each up
to 80 characters in length may be located anywhere on a graph,
displayed in your choice of color and text styles...
Custom text is added to a graph using the "Text" menu options.
Before entering the text, the foreground and background color of
the text as well as any text style options (including text font,
text size settings, etc.) should be selected.
Once text attributes are established, select "Enter text string" to
enter the actual text you wish to add to the graph. After typing
in the text, ZGRAFWIN will direct you to position the mouse cursor
at the location onscreen where the text is to be placed. When you
click the mouse button, the text is shown in the window, and is
locked in position. Now whenever you regenerate a graph, these
custom text strings will be added onto the screen at their proper
-------------------------------------------------------------------------------
positions. Custom text strings will also be printed (superimposed
on the graph), if you print a graph...
If you make a mistake, you can successively delete ("undo") the
most recently entered text strings one-by-one, using "Delete last
string", or clear all text strings entered from the window at once
with "Delete All text".
Note: If you choose to print a graph with text-strings, it is best
to use a screen-print mode (see section V, "Printing"), to
ensure that the strings are printed in the correct
locations. If the Direct-GDI mode is used to print, the
text strings may be located a bit erratically on the printed
page, because of resolution differences between the screen
and the printed output. With some extra effort and
trial-and-error, however, the Direct-GDI mode may be used.
F. Tool Bar Selections
The Tool Bar Options should be fairly self-evident; however, here
is a brief summary of each function:
Load/Draw -- Loads a Graph Data File and Immediately Displays
it Onscreen.
Redraw Screen -- Redraws the Entire Window (Both the Tool Bar
Area and the Graph Display Area).
Redraw Graph -- Redraws Only the Graph Area of a Window. This
is a Convenient Way to Redraw/Redisplay a Graph After Changing
More Graph Parameters, or It Can Be Used to Remove the Effects
of Undesired Paint Operations.
Edit Data -- Brings Up a Dialog Box Allowing the User to Edit
Data for a Given Graph. Note: This Option Does Not Apply For
the F-2D and G-3D Graphs.
Title -- Allows the User to Select a Main Graph Title.
Edit Text -- Switches to the ZGRAFWIN Editor With Which the
User May Edit Small Files (i.e., Less than 10K Bytes). The
Editor is Ideal for Editing ZGRAFWIN Graph Data Files.
Load PCX -- Imports and Displays a PCX File within ZGRAFWIN.
Save PCX -- Saves Current Graph Window Contents to a PCX File.
Print -- May Be Used to Print the Current Graph, Based Upon
Print Setup Options and/or Print Settings Options (Next Two
Toolbar Options)
Print Setup -- Brings Up the Windows Printer Driver Dialog Box.
This Option uses COMMDLG.DLL and Won't Work Under Windows 3.0.
Print Settings -- Allows the User to Select Individual Graph
Print Settings.
Help -- Brings Up the ZGRAFWIN Online Help Index.
-------------------------------------------------------------------------------
VII. FILES INCLUDED ON DISK
The following files are part of this package:
ZGRAFWIN.EXE - ZGRAFWIN Main Windows Executable Program
ZGRAFWIN.HLP - ZGRAFWIN Online Help File
ZGRAFWIN.CFG - ZGRAFWIN Configuration File
ZGRAFWIN.DOC - ZGRAFWIN User Instructions (this file)
XY.DAT - Sample data-file for Discrete X/Y graph
LOG.DAT - Sample data-file for Log graph
AREA.DAT - Sample data-file for Area/Ribbon graph
POLAR.DAT - Sample data-file for Polar graph
BAR.DAT - Sample data-file for Bar graph
PIE.DAT - Sample data-file for Pie graph
WHATS.NEW - History, Improvements to ZGRAFWIN
DEMO.EXE - ZGRAFWIN Demonstration Program
VIII. REGISTRATION
If you have found ZGRAFWIN useful, a registration fee of $15 US (or
an amount you feel appropriate) would be greatly appreciated. Use
the registration/user-response form below, or one of your own.
By registering ZGRAFWIN you will gain access to upcoming program
news and information. Also, if you register now, you will be
entitled to two free program updates, when they become available.
I'm interested in any comments/feedback you might have regarding
the program--including information on any problems you've had using
the program and general information on how I might improve things.
Please direct correspondence to:
John Jakob, ZGRAFWIN Software
1831 Old Hickory Court
New Albany, IN 47150
Phone: (812) 949-9524 (h)
(502) 425-9787 (w)
BBS: (812) 949-0416
Compuserve ID: 70742,1356
Important Notes:
1. If you work in a non-profit agency, charitable/humanitarian
organization, ministry, etc., or for some reason are unable
to afford the $15 registration fee, you may register
ZGRAFWIN for yourself/your organization free of charge.
However, please do write and let me know you want to
register, so I can put your name and/or organization on my
mailing list. Thanks!
2. If you're a software developer/programmer and would be
interested in utilizing/modifying ZGRAFWIN graphics for use
in your (MS-Windows 3.X) applications, you may purchase the
complete source code to ZGRAFWIN for a reasonable price.
Also, a programmer's toolkit is available for $30 and
includes the MS-Windows 'C' source to all the graphics
functions (requires Borland's TCW++/BC++ or the Microsoft
SDK to use). Contact me for details...
-------------------------------------------------------------------------------
3. If you want to get the latest version of ZGRAFWIN and have
a modem, just dial the ZGRAF/ZGRAFWIN BBS at (812) 949-0416
(BBS services available late October 1992). Alternatively,
you can download the file "ZGRWIN.ZIP" from Compuserve in
the IBM Applications Forum. [GO IBMAPP, Library #13]. I
will try to keep this version of the program current.
Online software registration for this program is now
possible thru Compuserve also.
********************************************************************
* ZGRAF/ZGRAFWIN REGISTRATION/RESPONSE FORM
********************************************************************
*
*
* Name: ____________________________________________
*
* Address: ___________________________________________
*
* City, State, ZIP:___________________________________
*
* Country: ___________________________________________
*
*
*
* Please Indicate _____ ZGRAFWIN Windows Registration $15 US
* Your Choice(s):
* _____ ZGRAF MS-DOS Registration $10 US
*
*
* To assist me in creating a better product for you, the user,
* please answer the following questions:
*
*
* 1. Where did you hear of the program (please be specific)?
* ________________________________________________________
* ________________________________________________________
*
* 2. What is your general impression of the program? What
* features do you like? What do you dislike, or what
* would you like to see added or improved?
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
*
* 3. Would you personally recommend ZGRAF or ZGRAFWIN for
* another user? Why or why not?
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
*
* 4. Any Other General Comments:
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
* ________________________________________________________
*
*
* Please Complete John Jakob, ZGRAF/ZGRAFWIN Software
* and Mail To: 1831 Old Hickory Court
* New Albany, IN 47150
*
*
********************************************************************
*
********************************************************************